package gt.edu.usac.viewcontroller.backing.app;

import gt.edu.usac.model.am.AppModuleImpl;

import gt.edu.usac.model.vo.designacionCentroViewImpl;
import gt.edu.usac.model.vo.designacionEdificioViewImpl;
import gt.edu.usac.model.vo.designacionSalonDiaViewImpl;
import gt.edu.usac.model.vo.designacionSalonHorarioViewImpl;
import gt.edu.usac.model.vo.designacionSalonViewImpl;
import gt.edu.usac.model.vo.edificioViewImpl;
import gt.edu.usac.model.vo.idiomaNivelSeccionDetImpl;
import gt.edu.usac.model.vo.idiomaNivelSeccionViewImpl;
import gt.edu.usac.model.vo.idiomaNivelViewImpl;
import gt.edu.usac.model.vo.idiomaProfesorViewImpl;
import gt.edu.usac.model.vo.reservaSalonViewImpl;
import gt.edu.usac.model.vo.salonViewImpl;
import gt.edu.usac.viewcontroller.utils.ADFUtils;
import gt.edu.usac.viewcontroller.utils.JSFUtils;

import java.util.Calendar;

import javax.faces.component.UIComponent;
import javax.faces.component.UISelectItems;
import javax.faces.component.html.HtmlForm;

import javax.faces.component.html.HtmlPanelGroup;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;

import javax.faces.event.ValueChangeEvent;

import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCBindingContainer;
import oracle.adf.model.binding.DCDataControl;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.adf.view.faces.component.core.data.CoreColumn;
import oracle.adf.view.faces.component.core.data.CoreTable;
import oracle.adf.view.faces.component.core.input.CoreInputText;
import oracle.adf.view.faces.component.core.input.CoreSelectOneChoice;
import oracle.adf.view.faces.component.core.layout.CorePanelForm;
import oracle.adf.view.faces.component.core.layout.CorePanelGroup;
import oracle.adf.view.faces.component.core.layout.CorePanelHeader;
import oracle.adf.view.faces.component.core.layout.CorePanelHorizontal;
import oracle.adf.view.faces.component.core.layout.CorePanelTip;
import oracle.adf.view.faces.component.core.nav.CoreCommandButton;


import oracle.adf.view.faces.component.core.nav.CoreCommandLink;
import oracle.adf.view.faces.component.core.output.CoreObjectSpacer;
import oracle.adf.view.faces.component.core.output.CoreOutputText;

import oracle.binding.BindingContainer;
import oracle.binding.OperationBinding;

import oracle.jbo.ApplicationModule;
import oracle.jbo.AttributeList;
import oracle.jbo.Row;
import oracle.jbo.RowSetIterator;
import oracle.jbo.server.ViewRowImpl;

public class NuevaSeccion {
    private HtmlForm form1;
    private BindingContainer bindings;
    private CorePanelGroup panelGroup4;
    private CorePanelHeader panelHeader31;
    private String valorAno;
    private CorePanelGroup panelGroup5;
    private CorePanelForm panelForm4;
    private CoreInputText inputText4;
    private CoreCommandButton commandButton13;
    private CoreCommandButton commandButton14;
    private CoreSelectOneChoice selectOneChoice4;
    private UISelectItems selectItems4;
    private CoreCommandButton commandButton15;
    private CorePanelGroup panelGroup6;
    private CorePanelForm panelForm5;
    private CorePanelHorizontal panelHorizontal3;
    private CoreCommandButton commandButton11;
    private CoreCommandButton commandButton19;
    private CoreCommandButton commandButton17;
    private CorePanelHorizontal panelHorizontal4;
    private CorePanelGroup panelGroup7;
    private CoreTable table3;
    private CoreColumn column4;
    private CoreCommandLink commandLink5;
    private CoreColumn column6;
    private CoreOutputText outputText3;
    private CoreColumn column15;
    private CoreCommandLink commandLink7;
    private CoreCommandButton commandButton12;
    private CorePanelGroup panelGroup8;
    private CoreTable table4;
    private CoreCommandButton commandButton18;
    private CorePanelHorizontal panelHorizontal5;
    private CoreCommandButton commandButton5;
    private CoreCommandButton commandButton9;
    private CoreCommandButton commandButton7;
    private CoreObjectSpacer objectSpacer2;
    private CorePanelHeader panelHeader4;
    private CorePanelHeader panelHeader41;
    private CorePanelHeader panelHeader5;
    private HtmlPanelGroup panelGroup9;
    private CorePanelHeader panelHeader6;
    private CoreSelectOneChoice navList4;
    private UISelectItems selectItems10;
    private CoreSelectOneChoice navList5;
    private UISelectItems selectItems11;
    private CoreSelectOneChoice navList6;
    private UISelectItems selectItems12;
    private CoreSelectOneChoice navList1;
    private UISelectItems selectItems6;
    private CoreInputText inputText1;
    private CoreInputText inputText7;
    private CoreSelectOneChoice navList2;
    private UISelectItems selectItems8;
    private CorePanelGroup panelGroup10;
    private CorePanelHeader panelHeader7;
    private CoreSelectOneChoice selectOneChoice8;
    private UISelectItems selectItems13;
    private CoreSelectOneChoice selectOneChoice9;
    private UISelectItems selectItems14;
    private CoreTable table21;
    private CoreColumn column51;
    private CoreCommandLink commandLink8;
    private CoreColumn column71;
    private CoreOutputText outputText141;
    private CoreColumn column81;
    private CoreOutputText outputText151;
    private CoreColumn column91;
    private CoreOutputText outputText161;
    private CoreColumn column101;
    private CoreOutputText outputText171;
    private CoreColumn column111;
    private CoreOutputText outputText181;
    private CoreColumn column121;
    private CoreOutputText outputText191;
    private CoreColumn column131;
    private CoreOutputText outputText201;
    private CoreColumn column141;
    private CoreOutputText outputText211;
    private CoreColumn column221;
    private CoreOutputText outputText221;
    private CoreColumn column231;
    private CoreOutputText outputText231;
    private CoreColumn column271;
    private CorePanelHorizontal panelHorizontal21;
    private CoreOutputText outputText241;
    private CoreObjectSpacer objectSpacer11;
    private CoreOutputText outputText251;
    private CoreColumn column291;
    private CoreCommandLink commandLink41;
    private CorePanelForm panelForm31;
    private CoreInputText inputText9;
    private CoreInputText inputText10;
    private CoreInputText inputText51;
    private CoreInputText inputText61;
    private CoreInputText inputText14;
    private CoreSelectOneChoice selectOneChoice31;
    private UISelectItems selectItems16;
    private CoreInputText inputText81;
    private CoreSelectOneChoice selectOneChoice71;
    private UISelectItems selectItems17;
    private CoreSelectOneChoice selectOneChoice51;
    private UISelectItems selectItems18;
    private CoreInputText inputText111;
    private CoreInputText inputText121;
    private CoreInputText inputText131;
    private CoreCommandButton commandButton21;
    private CoreSelectOneChoice selectOneChoice1;
    private UISelectItems selectItems1;
    private CoreSelectOneChoice selectOneChoice2;
    private UISelectItems selectItems2;
    private CorePanelTip panelTip1;
    private CoreOutputText outputText12;
    private CoreColumn column20;
    private CoreOutputText outputText1;
    private CoreColumn column24;
    private CoreOutputText outputText2;
    private CoreColumn column26;
    private CoreOutputText outputText4;
    private CoreColumn column18;
    private CoreOutputText outputText5;
    private CoreColumn column21;
    private CoreOutputText outputText6;
    private CoreColumn column25;
    private CoreOutputText outputText7;
    private CoreColumn column19;
    private CoreOutputText outputText8;
    private CoreColumn column1;
    private CoreColumn column11;
    private CoreOutputText outputText10;
    private CoreColumn column28;
    private CoreCommandLink commandLink9;
    private CoreCommandLink commandLink1;
    private CoreInputText inputText2;

    public void setValorAno(String valorAno) {
        this.valorAno = valorAno;        
    }

    public String getValorAno() {
        this.valorAno = String.valueOf(Calendar.getInstance().get(Calendar.YEAR));
        return valorAno;
    }

    public void setForm1(HtmlForm form1) {
        this.form1 = form1;
    }

    public HtmlForm getForm1() {
        return form1;
    }


    public BindingContainer getBindings() {
        return this.bindings;
    }

    public void setBindings(BindingContainer bindings) {
        this.bindings = bindings;
    }

    public String commandLink1_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("setCurrentRowWithKey");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }        
        DCBindingContainer dbc = (DCBindingContainer)getBindings();
        DCIteratorBinding iterator = dbc.findIteratorBinding("idiomaView1Iterator");        
        Row r = iterator.getRowAtRangeIndex((Integer)ADFUtils.getBoundAttributeValue("idioma1"));
        String idIdioma = r.getAttribute("IdIdioma").toString();
        AppModuleImpl service = getAppModule();         
        //System.out.println(service.getidiomaNivelView2().getCurrentRow().getAttribute("IdNivel"));
        idiomaProfesorViewImpl idiomap = service.getidiomaProfesorView1();
        idiomap.setpidioma(idIdioma);
        idiomap.executeQuery();
       /* AppModuleImpl service = getAppModule();
        idiomaNivelViewImpl nivel = service.getidiomaNivelView1();
        Row row=  nivel.getCurrentRow();                
       JSFUtils.setExpressionValue("#{bindings.secIdioma.inputValue}",Integer.valueOf(row.getAttribute("IdIdioma").toString()));
        System.out.println(JSFUtils.resolveExpression("#{bindings.secIdioma.inputValue}"));
        JSFUtils.setExpressionValue("#{bindings.secNivel.inputValue}",Integer.valueOf(row.getAttribute("IdNivel").toString()));
        System.out.println(JSFUtils.resolveExpression("#{bindings.secNivel.inputValue}"));
        operationBinding = bindings.getOperationBinding("ExecuteWithParamsSeccion");
        operationBinding.execute();*/
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",1);
        return null;
    }


    public String commandButton4_action() {
        crearNivel();
        DCBindingContainer dbc = (DCBindingContainer)getBindings();
        DCIteratorBinding iterator = dbc.findIteratorBinding("idiomaView1Iterator");        
        Row r = iterator.getRowAtRangeIndex((Integer)ADFUtils.getBoundAttributeValue("idioma1"));
        String idIdioma = r.getAttribute("IdIdioma").toString();
        AppModuleImpl service = getAppModule();         
        idiomaProfesorViewImpl idiomap = service.getidiomaProfesorView1();
        idiomap.setpidioma(idIdioma);
        idiomap.executeQuery();
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",1);       
        return null;
    }
    
    public AppModuleImpl getAppModule() {
        FacesContext ctx = FacesContext.getCurrentInstance();
        ValueBinding vb = ctx.getApplication().createValueBinding("#{data}");
        BindingContext bc = (BindingContext)vb.getValue(ctx);
        DCDataControl dc = bc.findDataControl("AppModuleDataControl");
        ApplicationModule am = (ApplicationModule)dc.getDataProvider();
        return (AppModuleImpl)am;
    }


    public String commandButton2_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("Commit");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",0);
        JSFUtils.setExpressionValue("#{bindings.nuevo.inputValue}",false);
        return null;
    }

    public String commandButton3_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("Rollback");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
       /* AppModuleImpl service = getAppModule();
        idiomaNivelViewImpl nivel = service.getidiomaNivelView2();
        if((Boolean) JSFUtils.resolveExpression("#{bindings.nuevo.inputValue}") && nivel.getCurrentRow()!=null)        
            nivel.removeCurrentRow();        */
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",0);
        JSFUtils.setExpressionValue("#{bindings.nuevo.inputValue}",false);
        return null;
    }


    public String commandButton4_action2() {
        crearSeccion();
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",2);        
        return null;
    }
    
    


    public void setPanelGroup4(CorePanelGroup panelGroup4) {
        this.panelGroup4 = panelGroup4;
    }

    public CorePanelGroup getPanelGroup4() {
        return panelGroup4;
    }

    public void setPanelHeader31(CorePanelHeader panelHeader31) {
        this.panelHeader31 = panelHeader31;
    }

    public CorePanelHeader getPanelHeader31() {
        return panelHeader31;
    }


    public String commandButton7_action() {
       BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("Rollback");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
       /* AppModuleImpl service = getAppModule();   
        service.getidiomaNivelSeccionDet2().getDBTransaction().rollback();*/
      /*  AppModuleImpl service = getAppModule();        
        idiomaNivelSeccionViewImpl seccion = service.getidiomaNivelSeccionView3();           
        if((Boolean) JSFUtils.resolveExpression("#{bindings.nuevo.inputValue}") && seccion.getCurrentRow()!=null){
            idiomaNivelSeccionDetImpl detalle = service.getidiomaNivelSeccionDet2(); 
            while(detalle.getCurrentRow()!=null){
               detalle.removeCurrentRow();
            }
            seccion.removeCurrentRow();       
            service.getDBTransaction().commit();  
        }*/
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",0);        
        JSFUtils.setExpressionValue("#{bindings.nuevo.inputValue}",false);
        JSFUtils.setExpressionValue("#{bindings.nuevoDet.inputValue}",false);
        return null;
    }

    public String commandButton5_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("Commit");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        AppModuleImpl service = getAppModule();        
        service.getDBTransaction().rollback();        
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",0);
        JSFUtils.setExpressionValue("#{bindings.nuevo.inputValue}",false);        
        return null;
    }


    public String commandButton8_action() {
         BindingContainer bindings = getBindings();
         OperationBinding operationBinding = 
             bindings.getOperationBinding("Commit");
         Object result = operationBinding.execute();
         if (!operationBinding.getErrors().isEmpty()) {
             return null;
         }
        crearSeccion();
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",2);      
         return null;
    }


    public String commandButton10_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("Commit");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        crearNivel();
        return null;
    }
    
    public String crearNivel(){
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("CrearNivel");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        if(ADFUtils.getBoundAttributeValue("idioma1")!=null){
            DCBindingContainer dbc = (DCBindingContainer)getBindings();
            DCIteratorBinding iterator = dbc.findIteratorBinding("idiomaView1Iterator");        
            Row r = iterator.getRowAtRangeIndex((Integer)ADFUtils.getBoundAttributeValue("idioma1"));
            String idIdioma = r.getAttribute("IdIdioma").toString();
            AppModuleImpl service = getAppModule();
            idiomaNivelViewImpl nivel = service.getidiomaNivelView2();
           nivel.getCurrentRow().setAttribute("IdIdioma",idIdioma);
            JSFUtils.setExpressionValue("#{bindings.nuevo.inputValue}",true);
        }
                
        return null;
    }
    
    public String crearSeccion(){
        /*BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("CrearSeccion");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        } */       
        AppModuleImpl service = getAppModule();
        idiomaNivelSeccionViewImpl seccion = service.getidiomaNivelSeccionView3();
        Row secRow=  seccion.getCurrentRow();        
        secRow=seccion.createRow();
        secRow.setAttribute("IdIdioma",seccion.getpidioma());
        secRow.setAttribute("Anio",seccion.getpanio());
        secRow.setAttribute("IdTipoTemporada",seccion.getptemporada());
        secRow.setAttribute("IdNivel",seccion.getpnivel());
        seccion.insertRow(secRow);
        idiomaProfesorViewImpl idiomap = service.getidiomaProfesorView1();
        idiomap.setpidioma(seccion.getpidioma());
        idiomap.executeQuery();                
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",1);
        return null;
    }

    public String commandButton9_action() {
         BindingContainer bindings = getBindings();
         OperationBinding operationBinding = 
             bindings.getOperationBinding("Commit");
         Object result = operationBinding.execute();
         if (!operationBinding.getErrors().isEmpty()) {
             return null;
         }
        crearSeccion();                
        return null;
    }


    public String commandButton11_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("Rollback");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
         JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",0);
        return null;
    }


    public String commandLink2_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("setCurrentRowWithKey");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        
        AppModuleImpl service = getAppModule();        
        //Trabajando las queries
        idiomaNivelViewImpl nivel = service.getidiomaNivelView2();
        idiomaNivelSeccionViewImpl seccion = service.getidiomaNivelSeccionView3();
        //Eliminando todos los salones asociados
        while(seccion.getCurrentRow()!=null){
           seccion.removeCurrentRow();
        }
        service.getDBTransaction().commit();        
        nivel.removeCurrentRow();
        service.getDBTransaction().commit();
        return null;
    }


    public String commandLink3_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("setCurrentRowWithKey1");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        setParamsDet();
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",2);        
        return null;
    }


    public String commandLink4_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("setCurrentRowWithKey1");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        AppModuleImpl service = getAppModule();
        idiomaNivelSeccionViewImpl seccion = service.getidiomaNivelSeccionView3();
        seccion.removeCurrentRow();
        service.getDBTransaction().commit();
        return null;
    }


    public String commandButton12_action() {
         BindingContainer bindings = getBindings();
         OperationBinding operationBinding = 
             bindings.getOperationBinding("CrearDet");
         Object result = operationBinding.execute();
         if (!operationBinding.getErrors().isEmpty()) {
             return null;
         }
       /* AppModuleImpl service = getAppModule();
        idiomaNivelSeccionViewImpl seccion = service.getidiomaNivelSeccionView3();         
        idiomaNivelSeccionDetImpl detalle = service.getidiomaNivelSeccionDet1();
        Row row=  seccion.getCurrentRow();
        detalle.getCurrentRow().setAttribute("Anio",row.getAttribute("Anio"));
        detalle.getCurrentRow().setAttribute("IdTipoTemporada",row.getAttribute("IdTipoTemporada"));
        
        detalle.getCurrentRow().setAttribute("IdIdioma",row.getAttribute("IdIdioma"));
        detalle.getCurrentRow().setAttribute("IdNivel",row.getAttribute("IdNivel"));
        
        detalle.getCurrentRow().setAttribute("TipoCurso",row.getAttribute("TipoCurso"));
        detalle.getCurrentRow().setAttribute("Seccion",row.getAttribute("Seccion"));   */
        JSFUtils.setExpressionValue("#{bindings.nuevoDet.inputValue}",true);
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",2);        
        return null;
    }


    public void setParamsDet(){
       /* AppModuleImpl service = getAppModule();
        idiomaNivelSeccionViewImpl seccion = service.getidiomaNivelSeccionView3();         
        idiomaNivelSeccionDetImpl detalle = service.getidiomaNivelSeccionDet1();        
        Row row=  seccion.getCurrentRow();
        detalle.setpanio(row.getAttribute("Anio")!=null ? row.getAttribute("Anio").toString():"");
        detalle.setptemp(row.getAttribute("IdTipoTemporada")!=null ? row.getAttribute("IdTipoTemporada").toString():"");
        detalle.setpidio(row.getAttribute("IdIdioma")!=null ? row.getAttribute("IdIdioma").toString():"");
        detalle.setpnivel(row.getAttribute("IdNivel")!=null ? row.getAttribute("IdNivel").toString():"");
        detalle.setptipoc(row.getAttribute("TipoCurso")!=null ? row.getAttribute("TipoCurso").toString():"");
        detalle.setpsec(row.getAttribute("Seccion")!=null ? row.getAttribute("Seccion").toString():"");
        detalle.executeQuery();        */
    }

    public String commandLink5_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("setCurrentRowWithKey2");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        AppModuleImpl service = getAppModule();
        idiomaNivelSeccionDetImpl detalle = service.getidiomaNivelSeccionDet3();     
        if(detalle.getCurrentRow()!=null){
            detalle.removeCurrentRow();
            service.getDBTransaction().commit();
        }
        return null;
    }


    public void setPanelGroup5(CorePanelGroup panelGroup5) {
        this.panelGroup5 = panelGroup5;
    }

    public CorePanelGroup getPanelGroup5() {
        return panelGroup5;
    }

    public void setPanelForm4(CorePanelForm panelForm4) {
        this.panelForm4 = panelForm4;
    }

    public CorePanelForm getPanelForm4() {
        return panelForm4;
    }


    public void setInputText4(CoreInputText inputText4) {
        this.inputText4 = inputText4;
    }

    public CoreInputText getInputText4() {
        return inputText4;
    }

    public void setCommandButton13(CoreCommandButton commandButton13) {
        this.commandButton13 = commandButton13;
    }

    public CoreCommandButton getCommandButton13() {
        return commandButton13;
    }

    public void setCommandButton14(CoreCommandButton commandButton14) {
        this.commandButton14 = commandButton14;
    }

    public CoreCommandButton getCommandButton14() {
        return commandButton14;
    }

    public String commandLink7_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("setCurrentRowWithKey2");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",2);
        return null;
    }

    public String commandButton13_action() {
  
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",1);        
        JSFUtils.setExpressionValue("#{bindings.nuevoDet.inputValue}",false);
        return null;
    }

    public String commandButton14_action() {
      /*  BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("Rollback");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }*/
       /* AppModuleImpl service = getAppModule();        
        idiomaNivelSeccionDetImpl detalle = service.getidiomaNivelSeccionDet2();
        if((Boolean) JSFUtils.resolveExpression("#{bindings.nuevoDet.inputValue}") && detalle.getCurrentRow()!=null)
        detalle.removeCurrentRow();*/
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",1);
        JSFUtils.setExpressionValue("#{bindings.nuevoDet.inputValue}",false);
        return null;
    }

    public void setSelectOneChoice4(CoreSelectOneChoice selectOneChoice4) {
        this.selectOneChoice4 = selectOneChoice4;
    }

    public CoreSelectOneChoice getSelectOneChoice4() {
        return selectOneChoice4;
    }

    public void setSelectItems4(UISelectItems selectItems4) {
        this.selectItems4 = selectItems4;
    }

    public UISelectItems getSelectItems4() {
        return selectItems4;
    }

    public void setCommandButton15(CoreCommandButton commandButton15) {
        this.commandButton15 = commandButton15;
    }

    public CoreCommandButton getCommandButton15() {
        return commandButton15;
    }

    public String commandButton15_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("CrearDet");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }        
        actualizarReservar();
        JSFUtils.setExpressionValue("#{bindings.nuevoDet.inputValue}",true);
        return null;
    }


    public String commandButton1_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("ExecuteWithParams");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }        
        return null;
    }

    
    public void seccionChange(ValueChangeEvent evt){
        UIComponent c = evt.getComponent();  
        c.processUpdates(FacesContext.getCurrentInstance());
        executeWith("ExecuteWithParamsSeccion");
    }
    
    public void nivelChange(ValueChangeEvent evt){
        UIComponent c = evt.getComponent();  
        c.processUpdates(FacesContext.getCurrentInstance());
        executeWith("ExecuteWithParamsNivel");
        executeWith("ExecuteWithParamsSeccion");
    }
    
    public void anioChange(ValueChangeEvent evt){
        UIComponent c = evt.getComponent();  
        c.processUpdates(FacesContext.getCurrentInstance());
        executeWith("ExecuteWithParamsTemporada");
        executeWith("ExecuteWithParamsSeccion");
    }
    
    public void executeWith(String instruccion){
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = bindings.getOperationBinding(instruccion);
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
                   return;
        }
    }


    public void setPanelGroup6(CorePanelGroup panelGroup6) {
        this.panelGroup6 = panelGroup6;
    }

    public CorePanelGroup getPanelGroup6() {
        return panelGroup6;
    }


    public String commandButton17_action() {         
        actualizarReservar();
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",1);  
        return null;
    }


    public String commandButton18_action() {
       /* BindingContainer bindings = getBindings();
         OperationBinding operationBinding = 
             bindings.getOperationBinding("CreateReserva");
         Object result = operationBinding.execute();
         if (!operationBinding.getErrors().isEmpty()) {
             return null;
         }*/
        actualizarReservar();
         JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",3);   
        return null;
    }
    
    public void actualizarReservar(){
        try{
            AppModuleImpl service = getAppModule();        
            designacionCentroViewImpl  desCentro = service.getdesignacionCentroView2();
            designacionEdificioViewImpl  desEdificio = service.getdesignacionEdificioView2();        
            designacionSalonDiaViewImpl  desDia = service.getdesignacionSalonDiaView2();
            designacionSalonHorarioViewImpl  desHorario = service.getdesignacionSalonHorarioView2();
            designacionSalonViewImpl  desSalon = service.getdesignacionSalonView2();
            reservaSalonViewImpl res= service.getreservaSalonView2();
            desCentro.executeQuery();
            desEdificio.executeQuery();
            desDia.executeQuery();
            desHorario.executeQuery();
            desSalon.executeQuery();
            res.executeQuery();        
        }
        catch(Exception e){}
    }


    public String commandButton16_action() {
        // Add event code here...
        return null;
    }


    public String commandButton20_action() {
        AppModuleImpl service = getAppModule();        
         reservaSalonViewImpl  reserva = service.getreservaSalonView1();
         salonViewImpl   salon = service.getsalonView4();
         Row row=reserva.getCurrentRow();
         Row sal=salon.getCurrentRow();
         row.setAttribute("IdCentro",sal.getAttribute("IdCentro"));
         row.setAttribute("IdEdificio",sal.getAttribute("IdEdificio"));
         row.setAttribute("IdSalon",sal.getAttribute("IdSalon"));
         JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",2);   
        
        return null;
    }

    public String commandButton16_action2() {
        AppModuleImpl service = getAppModule();        
         reservaSalonViewImpl  reserva = service.getreservaSalonView1();
         salonViewImpl   salon = service.getsalonView4();
         Row row=reserva.getCurrentRow();
         Row sal=salon.getCurrentRow();
         row.setAttribute("IdCentro",sal.getAttribute("IdCentro"));
         row.setAttribute("IdEdificio",sal.getAttribute("IdEdificio"));
         row.setAttribute("IdSalon",sal.getAttribute("IdSalon"));
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("CreateReserva");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        return null;
    }


    public void setPanelForm5(CorePanelForm panelForm5) {
        this.panelForm5 = panelForm5;
    }

    public CorePanelForm getPanelForm5() {
        return panelForm5;
    }


    public String commandButton11_action2() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("agregarReservaSalon");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        actualizarReservar();
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",1);  
        AppModuleImpl service = getAppModule();                
        reservaSalonViewImpl res= service.getreservaSalonView2();     
        res.executeQuery();    
        return null;
    }


    public void setPanelHorizontal3(CorePanelHorizontal panelHorizontal3) {
        this.panelHorizontal3 = panelHorizontal3;
    }

    public CorePanelHorizontal getPanelHorizontal3() {
        return panelHorizontal3;
    }

    public void setCommandButton11(CoreCommandButton commandButton11) {
        this.commandButton11 = commandButton11;
    }

    public CoreCommandButton getCommandButton11() {
        return commandButton11;
    }

    public void setCommandButton19(CoreCommandButton commandButton19) {
        this.commandButton19 = commandButton19;
    }

    public CoreCommandButton getCommandButton19() {
        return commandButton19;
    }

    public void setCommandButton17(CoreCommandButton commandButton17) {
        this.commandButton17 = commandButton17;
    }

    public CoreCommandButton getCommandButton17() {
        return commandButton17;
    }

    public String commandButton19_action() {
         BindingContainer bindings = getBindings();
         OperationBinding operationBinding = 
             bindings.getOperationBinding("agregarReservaSalon");
         Object result = operationBinding.execute();
         if (!operationBinding.getErrors().isEmpty()) {
             return null;
         }
        actualizarReservar();
        return null;
    }


    public String commandLink9_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("setCurrentRowWithKeyReserva");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        AppModuleImpl service = getAppModule();
        reservaSalonViewImpl  reserva = service.getreservaSalonView2();
        if(reserva.getCurrentRow()!=null){
            reserva.removeCurrentRow();
            service.getDBTransaction().commit();
        }
        return null;
    }

    public void setPanelHorizontal4(CorePanelHorizontal panelHorizontal4) {
        this.panelHorizontal4 = panelHorizontal4;
    }

    public CorePanelHorizontal getPanelHorizontal4() {
        return panelHorizontal4;
    }

    public void setPanelGroup7(CorePanelGroup panelGroup7) {
        this.panelGroup7 = panelGroup7;
    }

    public CorePanelGroup getPanelGroup7() {
        return panelGroup7;
    }

    public void setTable3(CoreTable table3) {
        this.table3 = table3;
    }

    public CoreTable getTable3() {
        return table3;
    }

    public void setColumn4(CoreColumn column4) {
        this.column4 = column4;
    }

    public CoreColumn getColumn4() {
        return column4;
    }

    public void setCommandLink5(CoreCommandLink commandLink5) {
        this.commandLink5 = commandLink5;
    }

    public CoreCommandLink getCommandLink5() {
        return commandLink5;
    }

    public void setColumn6(CoreColumn column6) {
        this.column6 = column6;
    }

    public CoreColumn getColumn6() {
        return column6;
    }

    public void setOutputText3(CoreOutputText outputText3) {
        this.outputText3 = outputText3;
    }

    public CoreOutputText getOutputText3() {
        return outputText3;
    }

    public void setColumn15(CoreColumn column15) {
        this.column15 = column15;
    }

    public CoreColumn getColumn15() {
        return column15;
    }

    public void setCommandLink7(CoreCommandLink commandLink7) {
        this.commandLink7 = commandLink7;
    }

    public CoreCommandLink getCommandLink7() {
        return commandLink7;
    }

    public void setCommandButton12(CoreCommandButton commandButton12) {
        this.commandButton12 = commandButton12;
    }

    public CoreCommandButton getCommandButton12() {
        return commandButton12;
    }


    public void setPanelGroup8(CorePanelGroup panelGroup8) {
        this.panelGroup8 = panelGroup8;
    }

    public CorePanelGroup getPanelGroup8() {
        return panelGroup8;
    }

    public void setTable4(CoreTable table4) {
        this.table4 = table4;
    }

    public CoreTable getTable4() {
        return table4;
    }


    public void setCommandButton18(CoreCommandButton commandButton18) {
        this.commandButton18 = commandButton18;
    }

    public CoreCommandButton getCommandButton18() {
        return commandButton18;
    }


    public void setPanelHorizontal5(CorePanelHorizontal panelHorizontal5) {
        this.panelHorizontal5 = panelHorizontal5;
    }

    public CorePanelHorizontal getPanelHorizontal5() {
        return panelHorizontal5;
    }

    public void setCommandButton5(CoreCommandButton commandButton5) {
        this.commandButton5 = commandButton5;
    }

    public CoreCommandButton getCommandButton5() {
        return commandButton5;
    }

    public void setCommandButton9(CoreCommandButton commandButton9) {
        this.commandButton9 = commandButton9;
    }

    public CoreCommandButton getCommandButton9() {
        return commandButton9;
    }

    public void setCommandButton7(CoreCommandButton commandButton7) {
        this.commandButton7 = commandButton7;
    }

    public CoreCommandButton getCommandButton7() {
        return commandButton7;
    }

    public void setObjectSpacer2(CoreObjectSpacer objectSpacer2) {
        this.objectSpacer2 = objectSpacer2;
    }

    public CoreObjectSpacer getObjectSpacer2() {
        return objectSpacer2;
    }

    public void setPanelHeader4(CorePanelHeader panelHeader4) {
        this.panelHeader4 = panelHeader4;
    }

    public CorePanelHeader getPanelHeader4() {
        return panelHeader4;
    }

    public void setPanelHeader41(CorePanelHeader panelHeader41) {
        this.panelHeader41 = panelHeader41;
    }

    public CorePanelHeader getPanelHeader41() {
        return panelHeader41;
    }


    public void setPanelHeader5(CorePanelHeader panelHeader5) {
        this.panelHeader5 = panelHeader5;
    }

    public CorePanelHeader getPanelHeader5() {
        return panelHeader5;
    }

    public void setPanelGroup9(HtmlPanelGroup panelGroup9) {
        this.panelGroup9 = panelGroup9;
    }

    public HtmlPanelGroup getPanelGroup9() {
        return panelGroup9;
    }

    public void setPanelHeader6(CorePanelHeader panelHeader6) {
        this.panelHeader6 = panelHeader6;
    }

    public CorePanelHeader getPanelHeader6() {
        return panelHeader6;
    }


    public void setNavList4(CoreSelectOneChoice navList4) {
        this.navList4 = navList4;
    }

    public CoreSelectOneChoice getNavList4() {
        return navList4;
    }

    public void setSelectItems10(UISelectItems selectItems10) {
        this.selectItems10 = selectItems10;
    }

    public UISelectItems getSelectItems10() {
        return selectItems10;
    }

    public void setNavList5(CoreSelectOneChoice navList5) {
        this.navList5 = navList5;
    }

    public CoreSelectOneChoice getNavList5() {
        return navList5;
    }

    public void setSelectItems11(UISelectItems selectItems11) {
        this.selectItems11 = selectItems11;
    }

    public UISelectItems getSelectItems11() {
        return selectItems11;
    }

    public void setNavList6(CoreSelectOneChoice navList6) {
        this.navList6 = navList6;
    }

    public CoreSelectOneChoice getNavList6() {
        return navList6;
    }

    public void setSelectItems12(UISelectItems selectItems12) {
        this.selectItems12 = selectItems12;
    }

    public UISelectItems getSelectItems12() {
        return selectItems12;
    }


    public void setNavList1(CoreSelectOneChoice navList1) {
        this.navList1 = navList1;
    }

    public CoreSelectOneChoice getNavList1() {
        return navList1;
    }

    public void setSelectItems6(UISelectItems selectItems6) {
        this.selectItems6 = selectItems6;
    }

    public UISelectItems getSelectItems6() {
        return selectItems6;
    }

    public void setInputText1(CoreInputText inputText1) {
        this.inputText1 = inputText1;
    }

    public CoreInputText getInputText1() {
        return inputText1;
    }

    public void setInputText7(CoreInputText inputText7) {
        this.inputText7 = inputText7;
    }

    public CoreInputText getInputText7() {
        return inputText7;
    }


    public void setNavList2(CoreSelectOneChoice navList2) {
        this.navList2 = navList2;
    }

    public CoreSelectOneChoice getNavList2() {
        return navList2;
    }

    public void setSelectItems8(UISelectItems selectItems8) {
        this.selectItems8 = selectItems8;
    }

    public UISelectItems getSelectItems8() {
        return selectItems8;
    }


    public String commandButton21_action() {
        crearSeccion(); 
        return null;
    }


    public void setPanelGroup10(CorePanelGroup panelGroup10) {
        this.panelGroup10 = panelGroup10;
    }

    public CorePanelGroup getPanelGroup10() {
        return panelGroup10;
    }

    public void setPanelHeader7(CorePanelHeader panelHeader7) {
        this.panelHeader7 = panelHeader7;
    }

    public CorePanelHeader getPanelHeader7() {
        return panelHeader7;
    }


    public void setSelectOneChoice8(CoreSelectOneChoice selectOneChoice8) {
        this.selectOneChoice8 = selectOneChoice8;
    }

    public CoreSelectOneChoice getSelectOneChoice8() {
        return selectOneChoice8;
    }

    public void setSelectItems13(UISelectItems selectItems13) {
        this.selectItems13 = selectItems13;
    }

    public UISelectItems getSelectItems13() {
        return selectItems13;
    }

    public void setSelectOneChoice9(CoreSelectOneChoice selectOneChoice9) {
        this.selectOneChoice9 = selectOneChoice9;
    }

    public CoreSelectOneChoice getSelectOneChoice9() {
        return selectOneChoice9;
    }

    public void setSelectItems14(UISelectItems selectItems14) {
        this.selectItems14 = selectItems14;
    }

    public UISelectItems getSelectItems14() {
        return selectItems14;
    }

    public void setTable21(CoreTable table21) {
        this.table21 = table21;
    }

    public CoreTable getTable21() {
        return table21;
    }

    public void setColumn51(CoreColumn column51) {
        this.column51 = column51;
    }

    public CoreColumn getColumn51() {
        return column51;
    }

    public void setCommandLink8(CoreCommandLink commandLink8) {
        this.commandLink8 = commandLink8;
    }

    public CoreCommandLink getCommandLink8() {
        return commandLink8;
    }

    public void setColumn71(CoreColumn column71) {
        this.column71 = column71;
    }

    public CoreColumn getColumn71() {
        return column71;
    }

    public void setOutputText141(CoreOutputText outputText141) {
        this.outputText141 = outputText141;
    }

    public CoreOutputText getOutputText141() {
        return outputText141;
    }

    public void setColumn81(CoreColumn column81) {
        this.column81 = column81;
    }

    public CoreColumn getColumn81() {
        return column81;
    }

    public void setOutputText151(CoreOutputText outputText151) {
        this.outputText151 = outputText151;
    }

    public CoreOutputText getOutputText151() {
        return outputText151;
    }

    public void setColumn91(CoreColumn column91) {
        this.column91 = column91;
    }

    public CoreColumn getColumn91() {
        return column91;
    }

    public void setOutputText161(CoreOutputText outputText161) {
        this.outputText161 = outputText161;
    }

    public CoreOutputText getOutputText161() {
        return outputText161;
    }

    public void setColumn101(CoreColumn column101) {
        this.column101 = column101;
    }

    public CoreColumn getColumn101() {
        return column101;
    }

    public void setOutputText171(CoreOutputText outputText171) {
        this.outputText171 = outputText171;
    }

    public CoreOutputText getOutputText171() {
        return outputText171;
    }

    public void setColumn111(CoreColumn column111) {
        this.column111 = column111;
    }

    public CoreColumn getColumn111() {
        return column111;
    }

    public void setOutputText181(CoreOutputText outputText181) {
        this.outputText181 = outputText181;
    }

    public CoreOutputText getOutputText181() {
        return outputText181;
    }

    public void setColumn121(CoreColumn column121) {
        this.column121 = column121;
    }

    public CoreColumn getColumn121() {
        return column121;
    }

    public void setOutputText191(CoreOutputText outputText191) {
        this.outputText191 = outputText191;
    }

    public CoreOutputText getOutputText191() {
        return outputText191;
    }

    public void setColumn131(CoreColumn column131) {
        this.column131 = column131;
    }

    public CoreColumn getColumn131() {
        return column131;
    }

    public void setOutputText201(CoreOutputText outputText201) {
        this.outputText201 = outputText201;
    }

    public CoreOutputText getOutputText201() {
        return outputText201;
    }

    public void setColumn141(CoreColumn column141) {
        this.column141 = column141;
    }

    public CoreColumn getColumn141() {
        return column141;
    }

    public void setOutputText211(CoreOutputText outputText211) {
        this.outputText211 = outputText211;
    }

    public CoreOutputText getOutputText211() {
        return outputText211;
    }

    public void setColumn221(CoreColumn column221) {
        this.column221 = column221;
    }

    public CoreColumn getColumn221() {
        return column221;
    }

    public void setOutputText221(CoreOutputText outputText221) {
        this.outputText221 = outputText221;
    }

    public CoreOutputText getOutputText221() {
        return outputText221;
    }

    public void setColumn231(CoreColumn column231) {
        this.column231 = column231;
    }

    public CoreColumn getColumn231() {
        return column231;
    }

    public void setOutputText231(CoreOutputText outputText231) {
        this.outputText231 = outputText231;
    }

    public CoreOutputText getOutputText231() {
        return outputText231;
    }

    public void setColumn271(CoreColumn column271) {
        this.column271 = column271;
    }

    public CoreColumn getColumn271() {
        return column271;
    }

    public void setPanelHorizontal21(CorePanelHorizontal panelHorizontal21) {
        this.panelHorizontal21 = panelHorizontal21;
    }

    public CorePanelHorizontal getPanelHorizontal21() {
        return panelHorizontal21;
    }

    public void setOutputText241(CoreOutputText outputText241) {
        this.outputText241 = outputText241;
    }

    public CoreOutputText getOutputText241() {
        return outputText241;
    }

    public void setObjectSpacer11(CoreObjectSpacer objectSpacer11) {
        this.objectSpacer11 = objectSpacer11;
    }

    public CoreObjectSpacer getObjectSpacer11() {
        return objectSpacer11;
    }

    public void setOutputText251(CoreOutputText outputText251) {
        this.outputText251 = outputText251;
    }

    public CoreOutputText getOutputText251() {
        return outputText251;
    }

    public void setColumn291(CoreColumn column291) {
        this.column291 = column291;
    }

    public CoreColumn getColumn291() {
        return column291;
    }

    public void setCommandLink41(CoreCommandLink commandLink41) {
        this.commandLink41 = commandLink41;
    }

    public CoreCommandLink getCommandLink41() {
        return commandLink41;
    }


    public void setPanelForm31(CorePanelForm panelForm31) {
        this.panelForm31 = panelForm31;
    }

    public CorePanelForm getPanelForm31() {
        return panelForm31;
    }

    public void setInputText9(CoreInputText inputText9) {
        this.inputText9 = inputText9;
    }

    public CoreInputText getInputText9() {
        return inputText9;
    }

    public void setInputText10(CoreInputText inputText10) {
        this.inputText10 = inputText10;
    }

    public CoreInputText getInputText10() {
        return inputText10;
    }

    public void setInputText51(CoreInputText inputText51) {
        this.inputText51 = inputText51;
    }

    public CoreInputText getInputText51() {
        return inputText51;
    }

    public void setInputText61(CoreInputText inputText61) {
        this.inputText61 = inputText61;
    }

    public CoreInputText getInputText61() {
        return inputText61;
    }

    public void setInputText14(CoreInputText inputText14) {
        this.inputText14 = inputText14;
    }

    public CoreInputText getInputText14() {
        return inputText14;
    }

    public void setSelectOneChoice31(CoreSelectOneChoice selectOneChoice31) {
        this.selectOneChoice31 = selectOneChoice31;
    }

    public CoreSelectOneChoice getSelectOneChoice31() {
        return selectOneChoice31;
    }

    public void setSelectItems16(UISelectItems selectItems16) {
        this.selectItems16 = selectItems16;
    }

    public UISelectItems getSelectItems16() {
        return selectItems16;
    }

    public void setInputText81(CoreInputText inputText81) {
        this.inputText81 = inputText81;
    }

    public CoreInputText getInputText81() {
        return inputText81;
    }

    public void setSelectOneChoice71(CoreSelectOneChoice selectOneChoice71) {
        this.selectOneChoice71 = selectOneChoice71;
    }

    public CoreSelectOneChoice getSelectOneChoice71() {
        return selectOneChoice71;
    }

    public void setSelectItems17(UISelectItems selectItems17) {
        this.selectItems17 = selectItems17;
    }

    public UISelectItems getSelectItems17() {
        return selectItems17;
    }

    public void setSelectOneChoice51(CoreSelectOneChoice selectOneChoice51) {
        this.selectOneChoice51 = selectOneChoice51;
    }

    public CoreSelectOneChoice getSelectOneChoice51() {
        return selectOneChoice51;
    }

    public void setSelectItems18(UISelectItems selectItems18) {
        this.selectItems18 = selectItems18;
    }

    public UISelectItems getSelectItems18() {
        return selectItems18;
    }

    public void setInputText111(CoreInputText inputText111) {
        this.inputText111 = inputText111;
    }

    public CoreInputText getInputText111() {
        return inputText111;
    }

    public void setInputText121(CoreInputText inputText121) {
        this.inputText121 = inputText121;
    }

    public CoreInputText getInputText121() {
        return inputText121;
    }

    public void setInputText131(CoreInputText inputText131) {
        this.inputText131 = inputText131;
    }

    public CoreInputText getInputText131() {
        return inputText131;
    }

    public String commandLink8_action() {    
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("setCurrentRowWithKey1");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        AppModuleImpl service = getAppModule();
        idiomaNivelSeccionViewImpl seccion = service.getidiomaNivelSeccionView3();
        Row secRow=  seccion.getCurrentRow();              
        idiomaProfesorViewImpl idiomap = service.getidiomaProfesorView1();
        idiomap.setpidioma(seccion.getpidioma());
        idiomap.executeQuery();     
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",1);        
        return "setCurrentRowWithKey1";
    }

    public void setCommandButton21(CoreCommandButton commandButton21) {
        this.commandButton21 = commandButton21;
    }

    public CoreCommandButton getCommandButton21() {
        return commandButton21;
    }

    public String commandLink6_action() {
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("setCurrentRowWithKeyReserva");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        JSFUtils.setExpressionValue("#{bindings.mostrar.inputValue}",3);   
        return "setCurrentRowWithKey3";
    }


    public String commandButton1_action2() {
        AppModuleImpl service = getAppModule();
        idiomaNivelSeccionViewImpl seccion = service.getidiomaNivelSeccionView3();
        System.out.println("anio: "+seccion.getpanio());
        System.out.println("Temp: "+seccion.getptemporada());
        System.out.println("idioma: "+seccion.getpidioma());
        System.out.println("nivel: "+seccion.getpnivel());
        System.out.println("-------");
        System.out.println(JSFUtils.resolveExpression("#{bindings.panio.inputValue}"));
        System.out.println(JSFUtils.resolveExpression("#{bindings.pidioma.inputValue}"));
        System.out.println(JSFUtils.resolveExpression("#{bindings.pnivel.inputValue}"));
        System.out.println(JSFUtils.resolveExpression("#{bindings.ptemporada.inputValue}"));
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = 
            bindings.getOperationBinding("ExecuteWithParamsSeccion");
        Object result = operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        return null;
    }

    public void setSelectOneChoice1(CoreSelectOneChoice selectOneChoice1) {
        this.selectOneChoice1 = selectOneChoice1;
    }

    public CoreSelectOneChoice getSelectOneChoice1() {
        return selectOneChoice1;
    }

    public void setSelectItems1(UISelectItems selectItems1) {
        this.selectItems1 = selectItems1;
    }

    public UISelectItems getSelectItems1() {
        return selectItems1;
    }

    public void setSelectOneChoice2(CoreSelectOneChoice selectOneChoice2) {
        this.selectOneChoice2 = selectOneChoice2;
    }

    public CoreSelectOneChoice getSelectOneChoice2() {
        return selectOneChoice2;
    }

    public void setSelectItems2(UISelectItems selectItems2) {
        this.selectItems2 = selectItems2;
    }

    public UISelectItems getSelectItems2() {
        return selectItems2;
    }


    public void setPanelTip1(CorePanelTip panelTip1) {
        this.panelTip1 = panelTip1;
    }

    public CorePanelTip getPanelTip1() {
        return panelTip1;
    }

    public void setOutputText12(CoreOutputText outputText12) {
        this.outputText12 = outputText12;
    }

    public CoreOutputText getOutputText12() {
        return outputText12;
    }


    public void setColumn20(CoreColumn column20) {
        this.column20 = column20;
    }

    public CoreColumn getColumn20() {
        return column20;
    }

    public void setOutputText1(CoreOutputText outputText1) {
        this.outputText1 = outputText1;
    }

    public CoreOutputText getOutputText1() {
        return outputText1;
    }

    public void setColumn24(CoreColumn column24) {
        this.column24 = column24;
    }

    public CoreColumn getColumn24() {
        return column24;
    }

    public void setOutputText2(CoreOutputText outputText2) {
        this.outputText2 = outputText2;
    }

    public CoreOutputText getOutputText2() {
        return outputText2;
    }

    public void setColumn26(CoreColumn column26) {
        this.column26 = column26;
    }

    public CoreColumn getColumn26() {
        return column26;
    }

    public void setOutputText4(CoreOutputText outputText4) {
        this.outputText4 = outputText4;
    }

    public CoreOutputText getOutputText4() {
        return outputText4;
    }

    public void setColumn18(CoreColumn column18) {
        this.column18 = column18;
    }

    public CoreColumn getColumn18() {
        return column18;
    }

    public void setOutputText5(CoreOutputText outputText5) {
        this.outputText5 = outputText5;
    }

    public CoreOutputText getOutputText5() {
        return outputText5;
    }

    public void setColumn21(CoreColumn column21) {
        this.column21 = column21;
    }

    public CoreColumn getColumn21() {
        return column21;
    }

    public void setOutputText6(CoreOutputText outputText6) {
        this.outputText6 = outputText6;
    }

    public CoreOutputText getOutputText6() {
        return outputText6;
    }

    public void setColumn25(CoreColumn column25) {
        this.column25 = column25;
    }

    public CoreColumn getColumn25() {
        return column25;
    }

    public void setOutputText7(CoreOutputText outputText7) {
        this.outputText7 = outputText7;
    }

    public CoreOutputText getOutputText7() {
        return outputText7;
    }

    public void setColumn19(CoreColumn column19) {
        this.column19 = column19;
    }

    public CoreColumn getColumn19() {
        return column19;
    }

    public void setOutputText8(CoreOutputText outputText8) {
        this.outputText8 = outputText8;
    }

    public CoreOutputText getOutputText8() {
        return outputText8;
    }

    public void setColumn1(CoreColumn column1) {
        this.column1 = column1;
    }

    public CoreColumn getColumn1() {
        return column1;
    }


    public void setColumn11(CoreColumn column11) {
        this.column11 = column11;
    }

    public CoreColumn getColumn11() {
        return column11;
    }

    public void setOutputText10(CoreOutputText outputText10) {
        this.outputText10 = outputText10;
    }

    public CoreOutputText getOutputText10() {
        return outputText10;
    }


    public void setColumn28(CoreColumn column28) {
        this.column28 = column28;
    }

    public CoreColumn getColumn28() {
        return column28;
    }

    public void setCommandLink9(CoreCommandLink commandLink9) {
        this.commandLink9 = commandLink9;
    }

    public CoreCommandLink getCommandLink9() {
        return commandLink9;
    }

    public void setCommandLink1(CoreCommandLink commandLink1) {
        this.commandLink1 = commandLink1;
    }

    public CoreCommandLink getCommandLink1() {
        return commandLink1;
    }


    public void setInputText2(CoreInputText inputText2) {
        this.inputText2 = inputText2;
    }

    public CoreInputText getInputText2() {
        return inputText2;
    }
}
